﻿using System;

namespace MugenInjection.Wcf.WebServiceHostImpl
{
    /// <summary>
    /// A service host that uses MugenInjection to create the service instances.
    /// </summary>
    public class MugenInjectionWebServiceHost : MugenInjectionWebServiceHostBase
    {
        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjectionWebServiceHostBase"/> class.
        /// </summary>
        public MugenInjectionWebServiceHost()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjectionWebServiceHostBase"/> class with the specified service type and base address.
        /// </summary>
        /// <param name="serviceType">The service type.</param><param name="baseAddresses">The base address of the service.</param>
        public MugenInjectionWebServiceHost(Type serviceType, params Uri[] baseAddresses)
        {
            WcfConfigExtension.InitializeServiceHostOnCreate(serviceType, baseAddresses, InitializeDescription,
                                                     InitializeDescription);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjectionWebServiceHostBase"/> class with the specified singleton server instance and base address.
        /// </summary>
        /// <param name="singletonInstance">A service instance to be used as the singleton instance.</param><param name="baseAddresses">The base address of the service.</param>
        public MugenInjectionWebServiceHost(object singletonInstance, params Uri[] baseAddresses)
            : base(singletonInstance, baseAddresses)
        {
        }

        #endregion
    }
}